package block

import kotlinx.coroutines.*

suspend fun getData(block: String.() -> String): String {
    delay(2000)
    return block("123")
}

suspend fun CoroutineScope.test() {
    println("111")
}

fun main(args: Array<String>): Unit = runBlocking {

    launch {
//        delay(2000)
        println("finish")
//        val data = getData {
//            return@getData this
//        }
//        println("$data")
//        val str = getData()
//        println("fetch data: $str")
    }
}